package com.itheima.lambda;

public interface Swim {
    void swimming();
}

class Test{
    public static void main(String[] args) {
        Swim s1 = new Swim() {
            @Override
            public void swimming() {
                System.out.println("游泳");
            }
        };

        Swim s2 = ()-> {
            System.out.println("游泳...");
        };

        method(()-> {
            System.out.println("游泳!!!!");
        });

    }
    public static  void method (Swim swim){
        swim.swimming();
    }
}
